<?php /* Smarty version 2.6.26, created on 2014-02-20 12:25:19
         compiled from default/public/member_order.html */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="view/default/style/basic.css" />
<link type="text/css" rel="stylesheet" href="view/default/style/member.css" />
<script type="text/javascript" src="view/default/js/ajax.js"></script>
<script type="text/javascript" src="view/default/js/member.js"></script>
<title>在线商城会员中心</title>
</head>
<body>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "default/public/header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div id="sait">
    当前位置：<a href="./">首页</a> &gt; 注册会员
</div>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "default/public/member_sidebar.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<div id="main">
    <h2>订单列表</h2>
    <table cellspacing="1">
        <tr><th>订单号</th><th>下单时间</th><th>总金额</th><th>订单状态</th><th>操作</th></tr>
        <?php $_from = $this->_tpl_vars['AllOrder']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
        <tr><td><a href="?a=member&m=order_details&id=<?php echo $this->_tpl_vars['value']->id; ?>
"><?php echo $this->_tpl_vars['value']->ordernum; ?>
</a></td><td><?php echo $this->_tpl_vars['value']->date; ?>
</td><td><?php echo $this->_tpl_vars['value']->price; ?>
</td><td>
        <?php if ($this->_tpl_vars['value']->order_state == '已取消'): ?>
            <span style="color:red">已取消</span>
        <?php else: ?>
            <?php if ($this->_tpl_vars['value']->refund == 1): ?>
                <span style="color:#666">申请退款中</span>
            <?php else: ?>
                <?php if ($this->_tpl_vars['value']->refund == 2): ?>
                    <span style="color:green;">成功退款</span>
                <?php else: ?>
                    <?php if ($this->_tpl_vars['value']->order_delivery == '已发货'): ?>
                         <span style="color:green">已发货</span>
                    <?php else: ?>
                        <?php if ($this->_tpl_vars['value']->order_delivery == '已配货'): ?>
                            <span style="color:green">已配货,等待发货</span>
                        <?php else: ?>
                            <?php if ($this->_tpl_vars['value']->order_pay == '已付款'): ?>
                                <span style="color:green">已付款</span>
                            <?php else: ?>
                                <?php if ($this->_tpl_vars['value']->order_state == '已确认'): ?>
                                    <span style="color:green">已确认，等到收款</span>
                                <?php else: ?>
                                    <span style="color:#666">未确认</span>
                                <?php endif; ?>
                            <?php endif; ?>
                        <?php endif; ?>
                    <?php endif; ?>
                  <?php endif; ?>
             <?php endif; ?>   
        <?php endif; ?></td><td>
        <?php if ($this->_tpl_vars['value']->order_state == '已取消'): ?>
            -----
        <?php else: ?> 
            <?php if ($this->_tpl_vars['value']->order_pay == '已付款' || $this->_tpl_vars['value']->order_delivery == '已配货' || $this->_tpl_vars['value']->order_delivery == '已发货'): ?>
                <?php if ($this->_tpl_vars['value']->refund == 1): ?>
                    -----
                <?php else: ?>
                    <?php if ($this->_tpl_vars['value']->refund == 2): ?>
                    <a href="?a=member&m=reOrder&id=<?php echo $this->_tpl_vars['value']->id; ?>
">重新下单</a> | <a href="?a=member&m=cancel&id=<?php echo $this->_tpl_vars['value']->id; ?>
" onclick="return confirm('确认取消订单?') ? true : false;">取消</a>
                    <?php else: ?>
                    <a href="?a=member&m=refund&id=<?php echo $this->_tpl_vars['value']->id; ?>
" onclick="return confirm('申请退款须知：\n\n1.已付款、已配货或已发货可申请退款；\n2.已付款或已配货的72小时确认退款；\n3.已发货的请寄回物品后72小时确认退款；\n\n 您真的要申请退款吗？') ? true : false;">申请退款</a>
                    <?php endif; ?>
                <?php endif; ?>
            <?php else: ?>
            <a href="?a=member&m=alipay&id=<?php echo $this->_tpl_vars['value']->id; ?>
">支付宝支付</a> |      
            <a href="?a=member&m=cancel&id=<?php echo $this->_tpl_vars['value']->id; ?>
" onclick="return confirm('确认取消订单?') ? true : false;">取消</a>
            <?php endif; ?>
        </td>
        <?php endif; ?>
        </tr>
        <?php endforeach; else: ?>
        <tr><td colspan="5">没有任何订单</td></tr>
        <?php endif; unset($_from); ?>
    </table>
    <div id="page"><?php echo $this->_tpl_vars['page']; ?>
</div>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'default/public/footer.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</body>
</html>